import request from '@/utils/request'
export default{
    getNestList(courseId){
        return request({
            url:`/admin/edu/chapter/list/${courseId}`,
            method:'get'
        })
    },
    saveChapter(chapter){
        return request({
            url:`/admin/edu/chapter/save`,
            method:'post',
            data:chapter
        })
    },
    getChapterById(chapterId){
        return request({
            url:`/admin/edu/chapter/${chapterId}`,
            method:'get'
        })
    },
    updateChapter(chapter){
       return request({
           url:`/admin/edu/chapter/update`,
           method:'put',
           data:chapter
       })
    },
    deleteChapterById(chapterId){
        return request({
            url:`/admin/edu/chapter/delete/${chapterId}`,
            method:'delete'
        })
    }
}